<?php
/**
 * Created by JetBrains PhpStorm.
 * User: CAIXUDONG
 * Date: 11-6-15
 * Time: 下午2:40
 */
@set_magic_quotes_runtime(0);
@date_default_timezone_set('Asia/Shanghai');
 
define('DS',        DIRECTORY_SEPARATOR);
define('ROOT_PATH', dirname(__FILE__) . DS);
define('MODEL_PATH', ROOT_PATH . 'model' . DS);
define('VIEW_PATH', ROOT_PATH . 'html' . DS);
define('LIB_PATH', ROOT_PATH . 'lib' . DS);
define('DB_PATH', ROOT_PATH . 'db' . DS);
define('CONFIG_PATH', ROOT_PATH . 'config' . DS);
define('MODULE_PATH', ROOT_PATH .  'module' . DS);
define('CONTROLLER_PATH', ROOT_PATH .  'controller' . DS);
define('LOG_PATH', ROOT_PATH . 'log' . DS);
define('START_TIME', microtime(true));
define('CHARSET',  'utf-8');

@header("Content-type: text/html; charset=".CHARSET);

if (isset($_GET['debug']) && !defined('DEBUG'))
    define('DEBUG', true);
else
    define('DEBUG', false);


include CONFIG_PATH . 'config.php';
include LIB_PATH . 'util.php';
include LIB_PATH . 'session.php';
$_session = Session::getInstance();
include LIB_PATH . 'input.php';
$_input = Input::getInstance();
include LIB_PATH . 'model.php';
include LIB_PATH . 'controller.php';
include LIB_PATH . 'response.php';
include LIB_PATH . 'template.php';
include LIB_PATH . 'db.php';
